var getMessageTask=null;
$(function () {

    $("#rootDirectory").click(function () {

        if (event.stopPropagation) {
            // 针对 Mozilla 和 Opera
            event.stopPropagation();
        }else if (window.event) {
            // 针对 IE
            window.event.cancelBubble = true;
        }

        var thisSpan = $(this);
        if ($(this).children('ul').css('display') == 'none') {
            $(this).children("a").children("i").removeClass("menu-icon-right");
            $(this).children("a").children("i").addClass("menu-icon-down");
            $(this).siblings().children("a").children("i").addClass("menu-icon-right");
            $(this).children("ul").slideDown("fast");
            $(this).siblings().children("ul").slideUp("fast");
        } else {
            $(this).children("a").children("i").removeClass("menu-icon-down");
            $(this).children("a").children("i").addClass("menu-icon-right");
            $(this).children("ul").slideUp("fast");
        }
    });
    /*$("#photoDownload").click(function () {
        event.stopPropagation();
        $("#projectDetails").children("a").removeClass("checkLi");
        $("#photoDownload").children("a").addClass("checkLi");
        var projectId=$("#projectId").val();
        $("#datamain").attr("src", "/homepage/getphotoListDetails?projectId=" + projectId);
    });
    $("#projectDetails").click(function () {
        event.stopPropagation();
        $("#photoDownload").children("a").removeClass("checkLi");
        $("#projectDetails").children("a").addClass("checkLi");
        var projectId=$("#projectId").val();
        $("#datamain").attr("src", "/homepage/getProjectDetails?projectId=" + projectId);
    });*/
    $("#personList").click(function () {

        if (event.stopPropagation) {
            // 针对 Mozilla 和 Opera
            event.stopPropagation();
        }else if (window.event) {
            // 针对 IE
            window.event.cancelBubble = true;
        }

        $("#personAdd").children("a").removeClass("checkLi");
        $("#personList").children("a").addClass("checkLi");
        $("#datamain").attr("src", "/personManage/personList");
    });
    $("#personAdd").click(function () {

        if (event.stopPropagation) {
            // 针对 Mozilla 和 Opera
            event.stopPropagation();
        }else if (window.event) {
            // 针对 IE
            window.event.cancelBubble = true;
        }

        $("#personList").children("a").removeClass("checkLi");
        $("#personAdd").children("a").addClass("checkLi");
        // alert(1);
        // var corpName = $("#corpName").val();
        // alert(corpName);
        // $("#datamain").attr("src", "/personManage/personList");
        $("#datamain").attr("src", "/personManage/personAdd");
    });
    init();
});
function init() {
    // $("#datamain").attr("src", "/homepage/findProjectCountByEpsId");
    $(".content-left-submenu ul li").children("ul").slideDown(10);
}
